import threading
import os

'''多线程'''

def f(name):
    print('运行线程%s(%s)'%(name,threading.current_thread().name))

if __name__ == "__main__":
    print('主线程%s开始运行了'%threading.current_thread().name)
    # f('test')
    # 创建一个新的线程
    t = threading.Thread(target=f,args=('test',))
    # 启动新线程
    t.start()
    print('主线程%s运行结束了'%threading.current_thread().name)